package com.itfs.enums;

/**
 *
 */
public enum Size {
    SMALL("S","小号"),
    MEDIUM("M","中号"),
    LARGE("L","大号");

    private String abbr;
    private String tittle;

    Size(String abbr, String tittle) {
        this.abbr = abbr;
        this.tittle = tittle;
    }

    public String getAbbr() {
        return abbr;
    }

    public void setAbbr(String abbr) {
        this.abbr = abbr;
    }

    public String getTittle() {
        return tittle;
    }

    public void setTittle(String tittle) {
        this.tittle = tittle;
    }
    public static Size fromAbbr(String abbr){
        for (Size size : Size.values()) {
            if (size.getAbbr().equals(abbr)){
                return size;
            }
        }
        return null;
    }


}
